package com.nut.service;

import com.nut.entity.User;

import java.util.List;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-04-15 15:57
 */
public interface UserService
{
    //查询所有User
    public List<User> findAll();

    //保存User
    void saveUser(User user);

    //校验User的name是否重复
    boolean checkUserByName(String name);

    //根据id获取User
    User getUserById(int number);

    //更新User
    void updateUser(User user);

    //根据id删除User
    void deleteUserById(int number);

    //批量删除User
    void batchDelete(List<Integer> numbers);

    //用户登录
    User login(User user);

    //转账
    public void transfer(User userA,User userB);
}
